<?php
class MW_Simplenews_Helper_Data extends Mage_Core_Helper_Abstract 
{
	static function getCategoryOptionValues($inlcudeNone = false) {

	    $collection = Mage::getModel('simplenews/category')->getCollection()->getData();
	    $values = array();
	    if ($inlcudeNone){
	        $values[] = array('label' => "--None--", 'value' => 0);
	    }

	    foreach ($collection as $category) {
	        $values[] = array('label' => $category['title'], 'value' => $category['id']);
	    }
	    return $values;
	 }

	// display news in left if admin set in config
	public function displayNewsLeft(){
    	$position = Mage::getStoreConfig('simplenews_section/simplenews_group/showon_field');
    	if($position == 0)
    	{
    		return 'simplenews/newsblock.phtml';
    	}
    }

	// display news in right if admin set in config
	public function displayNewsRight(){
    	$position = Mage::getStoreConfig('simplenews_section/simplenews_group/showon_field');
    	if($position == 1)
    	{
    		return 'simplenews/newsblock.phtml';
    	}
    }

    // display news in right if admin set in config
	public function displayNewsDisable(){
    	$position = Mage::getStoreConfig('simplenews_section/simplenews_group/showon_field');
    	if($position == 2)
    	{
    		return ;
    	}
    }
}